package com.graduation.check.mapper;

import com.graduation.check.dto.StudentListItem;
import com.graduation.check.dto.StudentListRequest;
import com.graduation.check.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface TeacherStudentMapper {
    
    /**
     * 获取学生列表
     */
    List<StudentListItem> selectStudentList(@Param("req") StudentListRequest request);
    
    /**
     * 获取学生总数
     */
    Long countStudents(@Param("req") StudentListRequest request);
    
    /**
     * 获取学生统计信息
     */
    Map<String, Object> getStudentSummary(@Param("req") StudentListRequest request);
    
    /**
     * 按班级分组获取学生
     */
    List<Map<String, Object>> selectStudentsByClass(@Param("major") String major);
    
    /**
     * 批量删除学生
     */
    Integer batchDeleteStudents(@Param("studentIds") List<Long> studentIds);
    
    /**
     * 批量更新学生状态
     */
    Integer batchUpdateStudentStatus(@Param("studentIds") List<Long> studentIds, @Param("status") Integer status);
}
